Add declarative custom-engine frontmatter and migrate Crush/OpenCode to shared behavior definitions#44465
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot remove crush/opencode from Go code and only keep them as shared agentic workflow files. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot create a new instruction file to help with configuring new agentic engines |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main and recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…c-engine-syntax Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Actions taken: none — working tree is clean, all previous fixes are in place. Hand-off: A maintainer needs to |
|
@copilot OpenCode is misconfigured https://github.com/github/gh-aw/actions/runs/29301322952/job/86985617751#step:28:1 |
…er with internal IP Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…172.30.0.30:10002)
OpenCode v1.2.14 uses @ai-sdk/openai@3.x for built-in providers (copilot, openai),
which always routes to the OpenAI Responses API (/v1/responses). The AWF proxy only
supports /v1/chat/completions, so every request fails with HTTP 503.
The fix is to use a custom provider name ("awf-proxy") which causes OpenCode to fall
back to @ai-sdk/openai-compatible, which ONLY uses Chat Completions API.
Previous fix (c5f4d10) used http://host.docker.internal:10002 as the api URL, but
from inside the AWF container this resolves to the Docker host machine's LLM gateway
which requires a real Copilot token and rejects the placeholder key.
Correct fix: use http://172.30.0.30:10002/v1 (constants.AWFAPIProxyContainerIP) which
is the internal Docker network address of the AWF api-proxy sidecar. This endpoint
accepts the awf-copilot-proxy placeholder key because the proxy handles token steering
internally.
Also adds 172.30.0.30 and 172.30.0.30:PORT entries to AWFNoProxyHosts so that Bun
(which backs OpenCode) bypasses Squid when making requests to the internal api-proxy.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit Root cause: OpenCode v1.2.14 uses Why the previous fix ( Actual fix (restored approach with correct IP):
A maintainer |
|
/smoke-opencode |
|
🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥 |
|
@copilot error with connection https://github.com/github/gh-aw/actions/runs/29303183562/job/86991186603#step:28:1 |
…ions Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…int is /chat/completions not /v1/chat/completions) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit Root cause: The AWF api-proxy sidecar at port 10002 serves the Copilot API format, which uses Fix: Changed to Please |
|
/smoke-opencode |
|
🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥 |
|
@copilot pick an older model compatible with completions https://github.com/github/gh-aw/actions/runs/29313009110/job/87020905713#step:28:1 |
…atibility Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Switched to Fixed in commit |
|
@copilot use sonnet 4.5 level model , not gpt-4.1 |
|
@copilot please run the
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Switched to |
|
/smoke-opencode |
|
🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥 |
Sighthound Security Scan — PR #44465127 total findings (84 in non-test production files, 13 in testdata, 30 in test files). After manual triage, the vast majority are false positives. 🟡 False Positives (no action needed)
🟠 Low-Risk Findings Worth a Second Look
No immediate remediation required — these are low-risk with contextual mitigations.
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
…compile lock files Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Hand-off: CI must be re-triggered by a maintainer (CGO lint-go and |
This introduces a richer engine-definition frontmatter shape for shared/custom agentic engines and uses it to move Crush and OpenCode off bespoke Go implementations onto a common declarative runtime path. The new syntax is expressive enough for CLI-style engines that need install, config, execution, MCP, capability, and auth wiring, including Auggie-like cases.
New engine-definition surface
engine.experimental,engine.auth, andengine.behaviorsto the named engine definition form.behaviorscaptures the runtime contract instead of hard-coding it in Go:authprovides explicit secret bindings for engines that need engine-specific credentials forwarded into the runtime.Shared behavior-defined runtime
BehaviorDefinedEnginethat materializes aCodingAgentEnginefrom frontmatter.Crush/OpenCode refactor
pkg/workflow/data/engines/crush.mdpkg/workflow/data/engines/opencode.mdSchema and docs
Coverage
Example of the new shared engine definition shape: